package com.onefinger.manager.managers
{
	import com.onefinger.manager.views.model.BaseCRUDModel;
	import com.onefinger.manager.views.model.WaiterCRUDModel;
	import com.onefinger.manager.vos.Waiter;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	import mx.collections.ArrayCollection;
	
	public class WaiterManager extends BaseManager
	{
		//--------------------------------------------------------------------
		//    Public Setters and Getters
		//--------------------------------------------------------------------
		
		//.................waiters......................
		private var _waiters:ArrayCollection;
		
		[Bindable(event="changeWaiters")]	
		public function get waiters():ArrayCollection
		{
			return _waiters;
		}
		public function setWaiters(value:ArrayCollection):void
		{
			_waiters = value;
			dispatchEvent( new Event( "changeWaiters" ) );
		}
		
		public function addWaiter(value:Waiter):void
		{
			_waiters.addItem(value);
			dispatchEvent( new Event( "changeWaiters" ) );
		}
		//.................Waiter......................
		private var _waiter:Waiter=new Waiter();
		
		[Bindable(event="changeWaiter")]
		public function get waiter():Waiter
		{
			return _waiter;
		}
		public function setWaiter(value:Waiter):void
		{
			_waiter = value;
			dispatchEvent( new Event( "changeWaiter" ) );
		}
		public function selectWaiter(value:Waiter):void
		{
			_waiter = value;
			dispatchEvent( new Event( "changeWaiter" ) );
		}
	}
}